]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Invalidate the current layout when windows are added or removed
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 22 Apr 2013 22:20:11 +0000 (18:20 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 22 Apr 2013 22:33:34 +0000 (18:33 -0400)
If windows are removed or added, we shouldn't keep the old layout, as it's
not valid anymore. If windows are removed, this is especially bad, as the
rows contain references to the removed window objects, causing crashes.

https://bugzilla.gnome.org/show_bug.cgi?id=698622

js/ui/workspace.js

index 8121c69cb859036b97d3402f80d17f742484ee03..ae6ad181a6416456a50157cc1ef2120c75093f1e 100644 (file)
@@ -1257,6 +1257,7 @@ const Workspace = new Lang.Class({
         this._cursorX = x;
         this._cursorY = y;
 
+        this._currentLayout = null;
         this._repositionWindowsId = Mainloop.timeout_add(750,
             Lang.bind(this, this._delayedWindowRepositioning));
     },
@@ -1304,6 +1305,7 @@ const Workspace = new Lang.Class({
             clone.overlay.relayout(false);
         }
 
+        this._currentLayout = null;
         this._recalculateWindowPositions(WindowPositionFlags.ANIMATE);
     },